Skip to content

feat: complete media usage tracking setup - #2538

Merged
khoinguyenpham04 merged 60 commits into
chore/media-usage-dev-seed-readinessfrom
feature/media-usage-activation-and-indexing
Aug 27, 2026
Merged

feat: complete media usage tracking setup#2538
khoinguyenpham04 merged 60 commits into
chore/media-usage-dev-seed-readinessfrom
feature/media-usage-activation-and-indexing

Conversation

@khoinguyenpham04

@khoinguyenpham04 khoinguyenpham04 commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Completes media usage tracking setup for new and existing sites.

  • The setup wizard selects tracking by default for new sites and lets administrators opt out before continuing.
  • Existing sites enable tracking from Settings → Media usage tracking after confirming that edits and other content updates are paused.
  • The visible settings page advances durable setup and indexing. Closing it pauses new requests; returning resumes from saved progress.
  • Each work claim handles up to 1,000 entries. Failures are isolated by collection, and projection memory is capped at 50,000 references or 16 MB before untouched work is released.
  • Cloudflare Queue, the dedicated media usage Cron, and Node scheduled recovery are removed. The unrelated general Cron remains unchanged.
  • Leases, retries, fencing, live-write safety, truthful coverage, collection deletion, Node support, and V1 compatibility remain intact.
  • Media Library and REST API documentation describe the current setup flow and result coverage.

This PR is stacked on #2472 and should be reviewed against chore/media-usage-dev-seed-readiness.

No linked issue.

Type of change

  • [] Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • [] Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (if applicable). No messages.po changes are included.
  • I have added and reviewed the user-facing changeset (if this PR changes a published package)
  • New features link to an approved Discussion: not applicable; this completes the existing media usage tracking stack

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: OpenAI Codex (GPT-5.6)

Screenshots / test output

  • Focused Admin, Core, and workerd/D1 suites pass.
  • Core and Admin typechecks and builds pass, along with the documentation build.
  • Type-aware lint, formatting, locale compilation, and git diff --check pass.
  • Local browser verification covers the confirmation dialog, keyboard acknowledgement, setup, continuation, and Ready state.

Try this PR

Open a fresh playground →

A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state.

Tracks feature/media-usage-activation-and-indexing. Updated automatically when the playground redeploys.

@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: efcc74c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
emdash Minor
@emdash-cms/admin Minor
@emdash-cms/cloudflare Minor
@emdash-cms/sandbox-workerd Patch
@emdash-cms/plugin-mcp-smoke Major
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site Patch
@emdash-cms/auth Minor
@emdash-cms/blocks Minor
@emdash-cms/gutenberg-to-portable-text Minor
@emdash-cms/x402 Minor
create-emdash Minor
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 3,521 lines across 63 files. Large PRs are harder to review and more likely to be closed without review.
This PR spans 5 different areas (area/core, area/admin, area/docs, area/templates, area/cloudflare). Consider breaking it into smaller, focused PRs.

If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs.

See CONTRIBUTING.md for contribution guidelines.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-do efcc74c Aug 27 2026, 10:31 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-playground 1fcbc86 Aug 18 2026, 10:43 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
docs 11f593b Aug 27 2026, 10:13 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-cache efcc74c Aug 27 2026, 10:31 AM

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
packages/admin/src/locales/en/messages.po Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@github-actions github-actions Bot removed the review/needs-rereview Author pushed changes since the last review label Aug 25, 2026
@github-actions github-actions Bot added review/needs-rereview Author pushed changes since the last review and removed review/awaiting-author Reviewed; waiting on the author to respond labels Aug 25, 2026
@khoinguyenpham04 khoinguyenpham04 changed the title fix: activate and index Media Usage fix: complete media usage tracking setup Aug 26, 2026
@khoinguyenpham04 khoinguyenpham04 changed the title fix: complete media usage tracking setup feat: complete media usage tracking setup Aug 26, 2026
@github-actions github-actions Bot added review/approved Approved; no new commits since and removed review/needs-rereview Author pushed changes since the last review labels Aug 27, 2026
stack merge was automatically disabled August 27, 2026 09:43

Pull Request is not mergeable

stack merge was automatically disabled August 27, 2026 09:45

Pull Request is not mergeable

# Conflicts:
#	packages/admin/src/components/MediaLibrary.tsx
#	packages/admin/tests/components/MediaLibrary.test.tsx
@github-actions github-actions Bot added review/needs-rereview Author pushed changes since the last review and removed review/approved Approved; no new commits since labels Aug 27, 2026
@khoinguyenpham04
khoinguyenpham04 merged commit 9c52b39 into main Aug 27, 2026
69 of 72 checks passed
@khoinguyenpham04
khoinguyenpham04 deleted the feature/media-usage-activation-and-indexing branch August 27, 2026 13:18
@emdashbot emdashbot Bot mentioned this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants